package me.spring.cloud.common.components.rpc.page;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;


/**
 * 分页结果
 * @author diyangfeng
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class PageResult extends Page {

    private static final long serialVersionUID = 1133870095491257217L;
    /**
     * 总数量
     */
    private long totalCount;

    /**
     * 总页数
     */
    private int totalPage;

    /** 是否有下一页 */
    private boolean isMore;

    public PageResult(Page page) {
        super(page.getPageSize(), page.getPageIndex(), page.getSortName(), page.getSortOrder());
    }
}
